From: Florian Müllner Date: Sat, 27 May 2023 13:00:43 +0000 (+0200) Subject: subprojects/shew: Adjust to GTK deprecation X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~337^2~2^2~25 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=62b4e67b38043d91e23379ca6a3f1bd24c0270fc;p=gnome-shell.git subprojects/shew: Adjust to GTK deprecation GTK 4.12 deprecates gdk_wayland_toplevel_unexport_handle() in favor of the new gdk_wayland_toplevel_drop_exported_handle(). We are not bound by API stability, so we can just expose the additional argument that the replacement requires instead of tracking the handle internally. Part-of: --- diff --git a/subprojects/shew/src/shew-window-exporter.c b/subprojects/shew/src/shew-window-exporter.c index ab84bf8a9..0e338dc2d 100644 --- a/subprojects/shew/src/shew-window-exporter.c +++ b/subprojects/shew/src/shew-window-exporter.c @@ -126,7 +126,8 @@ shew_window_exporter_export_finish (ShewWindowExporter *exporter, } void -shew_window_exporter_unexport (ShewWindowExporter *exporter) +shew_window_exporter_unexport (ShewWindowExporter *exporter, + const char *handle) { GtkWidget *widget; @@ -138,7 +139,11 @@ shew_window_exporter_unexport (ShewWindowExporter *exporter) if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (widget))) { GdkSurface *s = gtk_native_get_surface (GTK_NATIVE (widget)); +#if GTK_CHECK_VERSION (4, 11, 3) + gdk_wayland_toplevel_drop_exported_handle (GDK_WAYLAND_TOPLEVEL (s), handle); +#else gdk_wayland_toplevel_unexport_handle (GDK_WAYLAND_TOPLEVEL (s)); +#endif } #endif } diff --git a/subprojects/shew/src/shew-window-exporter.h b/subprojects/shew/src/shew-window-exporter.h index 224fff52f..e449fa3be 100644 --- a/subprojects/shew/src/shew-window-exporter.h +++ b/subprojects/shew/src/shew-window-exporter.h @@ -35,4 +35,5 @@ char *shew_window_exporter_export_finish (ShewWindowExporter *exporter, GAsyncResult *result, GError **error); -void shew_window_exporter_unexport (ShewWindowExporter *exporter); +void shew_window_exporter_unexport (ShewWindowExporter *exporter, + const char *handle);